package com.zy.dp.singleton.example4;

public class Singleton
{
	private static Singleton instance = null;

	private Singleton()
	{

	}

	public static Singleton getInstance()
	{
		if (instance == null)
		{
			instance = new Singleton();
		}

		return instance;

	}

	public static void main(String[] args)
	{

		for (int i = 0; i < 5; i++)

		{
			System.out.println(Singleton.getInstance());

		}

	}

}
